{include file=$header_start}
{strip}
<link rel="stylesheet" type="text/css" href="{$siteroot}/templates/default/style/find_job_list.css">
<script type="text/javascript" src="http://s7.addthis.com/js/200/addthis_widget.js"></script>
<script type="text/javascript" src="http://apis.google.com/js/plusone.js"></script>

<link rel="stylesheet" type="text/css" href="{$siteroot}/templates/default/style/registration.css">
<script type="text/javascript" src="{$siteroot}/includes/js/interest.js"></script>
<script type="text/javascript" src="{$siteroot}/greybox/greybox.js"></script>
<link href="{$siteroot}/greybox/greybox.css" rel="stylesheet" type="text/css" media="all" />
{/strip}
{literal}
<script type="text/javascript">
function paymentfunction(planid)
{
	
	document.getElementById("plan_id").value=planid;		
	
}

function testfunction(defval)
{
	var conf = confirm('Are you sure do you want to buy this lead?');
	//default_videoalert(defval);
	if(conf == true){
		var GB_ANIMATION = true;
		var url=SITEROOT+'/leads/'+defval+'/interest/';
        //var t = this.title || jQuery(this).text() || this.href;
        GB_show("",url,500,500);
         return false;
    
		//window.location=SITEROOT+'/leads/'+defval+'/interest/';
	}
}
</script>
{/literal}
<!--Gray box-->
{literal}
<script type="text/javascript">
	var GB_ANIMATION = true;
    jQuery(document).ready(function(){
    	jQuery("a.greybox").click(function(){
        var t = this.title || jQuery(this).text() || this.href;
        GB_show("",this.href,500,500);
         return false;
       });
     });
</script>
{/literal}


{literal}
<script type="text/javascript">

(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) {return;}
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));

function sendToSocialSite(str)
{ 
 popupWin = window.open(str,'mywindow','width=900,height=500,left=150,right=400,top=0');
 mywindow.moveTo(0,0);
}

</script>
{/literal}
{include file=$header_end}


<section class="middle_portion">
	<section class="inner_head"><span class="lF" style="color:#454545">View Job Detail</span><span class="rF"><a href="{$siteroot}/jobs/findjobs" >BACK</a></span><section class="clear"></section></section>
    <section class="inner_containstart">
    	<section class="inner_leftportion">
        	<section class="brows_tra_box">
            	<h4>Browse By Traders</h4>
                <ul>
                	{section name=t loop=$getallTradeCat} 
	                	<!--<li><a href="{$siteroot}/jobs/1/{$getallTradeCat[t].id}/jobtype/postalcode/findjobs/">&raquo; {$getallTradeCat[t].trade_category}</a></li>-->
                        <li><a href="{$siteroot}/jobs/{$getallTradeCat[t].new_tradename|strtolower}">&raquo; {$getallTradeCat[t].trade_category}</a></li>
                    {/section}  
                </ul>
                <h4>Browse By Job Type</h4>
                <ul>
                	{section name=t loop=$getallTradeJobType} 
	                	<!--<li><a href="{$siteroot}/jobs/1/trade/{$getallTradeJobType[t].id}/postalcode/findjobs/">&raquo; {$getallTradeJobType[t].trade_category}</a></li>-->
                        <li><a href="{$siteroot}/findjobs/{$getallTradeJobType[t].new_jobtypename|strtolower}">&raquo; {$getallTradeJobType[t].trade_category}</a></li>
                    {/section}
                </ul>
            </section>
        </section>
        
        <section class="inner_rightportion">
        	<section class="find_title">{$job_details.job_desc|truncate:40:""} - {$job_details.trade_name} job in {$job_details.suburbname}, {$job_details.statename}</section>
        	<section class="job_detail_wrapp">
            	<h4>
                	<span class="job_title">{$job_details.job_desc|truncate:40:""} </span>
                	<span class="sh_icon_box"><span class="lF">share this job:</span> <!--<img src="{$siteroot}/templates/default/images/sh_img.jpg" align="absmiddle" />--> 
                    
                    <span class="lF" style="margin-left:9px;"><a href="http://www.addthis.com/bookmark.php?v=20" onMouseOver="return addthis_open(this, '', '{$siteroot}/jobs/{$job_details.postjob_id|base64_encode}/findjobdetail/', '[TITLE]')" onMouseOut="addthis_close()" onClick="return addthis_sendto()"> <img src="{$siteroot}/templates/default/images/plus_ico.png" width="15px;" height="15px;"/> </a> </span>
                    <span class="lF"  style="margin-left:6px; margin-top:-2px;"><a href="{$job_details.mailicon}"><img src="{$siteroot}/templates/default/images/share-icon-mail.png" align="absmiddle" height="15" width="15" border="0"/></a></span>
					<span class="lF"  style="margin-left:6px;"><a onClick="sendToSocialSite('{$job_details.linkForTwitter}');" href="javascript: void(0);"><img src="{$siteroot}/templates/default/images/twi_icon.png" border="0"></a></span>
                    <span class="lF"  style="margin-left:6px;"><a href="javascript:;" onClick="sendToSocialSite('http://www.facebook.com/sharer.php?u={$siteroot}/jobsharetask.php%3Fjobid={$job_details.postjob_id}&t={$siteroot}')"><img src="{$siteroot}/templates/default/images/fb_icon.png" border="0"></a></span>                    
                	<span class="lF"  style="margin-left:6px;"><a href="javascript:;" onClick="sendToSocialSite('https://plus.google.com/share?url={$siteroot}/gplus.php%3Fjobid={$job_details.postjob_id}%26t={$siteroot}')"><img src="{$siteroot}/templates/default/images/g+_ico.png" border="0"></a></span>                    </span>
                    <section class="clear"></section>
                </h4>
                <section class="mt_detail_box">
                	<section class="map_box"><!--<img src="{$siteroot}/templates/default/images/upload/map.jpg" width="170" height="148" />-->
                    {php} include_once('../../findjob_map.php') {/php}
                    </section>
                    <section class="job_de_txt_box">
                    	<section class="loc_box"><span>Location:</span> {$job_details.suburbname} </section>
                        <section class="tarde_box"><span>Trade:</span> {$job_details.trade_name}</section>
						<section class="post_box"><span>Posted:</span> {$job_details.posted_date} <!--by: <a href="javascript:;">{$job_details.username}</a>--></section>    
                        <section class="post_box"><span>Budget:</span> Under ${$job_details.budgetname} </section> 
                        <section class="istart_box"><span>Ideal start date:</span> {$job_details.workstart}</section>                
                    </section>
                    <section class="clear"></section>
                </section>
                <h5>Job Description</h5>
                <article>{$job_details.job_desc}</article>
                 <section class="clear"></section>
                 {if $smarty.session.getbids_id}
                 <section class="buyerinfo" style="background:none;border:none;">
                {if ($userDetArray.leads neq '0' && $userDetArray.expiry_date gt $smarty.now|date_format:"%Y-%m-%d") || $getuserjobviewArr.id neq '' }  
                {if $getuserjobviewArr.id eq ''}
                <dl>
                
                <dd style="text-align:left">If you are interested then please click on below button.</dd>
                <section class="clear"></section>
               </dl>
               {/if}
               
                <dl>
                
                <dd>
                    <!-- <input type="button" {if $getuserjobviewArr.id eq ''} onclick="window.location.href='{$siteroot}/leads/{$smarty.get.id1}/{'open'|base64_encode}/buylead/'" value="Interest" {else} value="Purchase" {/if} name="btn_interest" id="btn_interest"  class="blue_btn margintp_bt " > -->
                    <a  href="javascript:;"  {if $getuserjobviewArr.id eq ''} onclick="return testfunction('{$smarty.get.id1}');"  class="blue_btn margintp_bt"  {else}class="blue_btn margintp_bt" {/if}  > {if $getuserjobviewArr.id eq ''}Interest{else}Purchase{/if} </a>
                    
                </dd>
                <section class="clear"></section>
               </dl>
             {else}
             
                <dl>
                <dt></dt>
                {if $userDetArray.leads eq '0'}
                    <div style="padding:0px;"><div class="error_msg" style="padding:0px;"> <span>Sorry you have not left leads. Please choose one option for upgradation.</span></div></div>
                {else}
                    <div style="padding:0px;"><div class="error_msg" style="padding:0px;"> <span>Sorry your plan has been expired. Please choose one option for upgradation.</span></div></div>
                {/if}	    
                <section class="clear"></section>
                </dl>
                
                
                
                <section style="width:695px;" class="rF">
                <span style="text-transform:uppercase; font-size:18px; padding-right:7px;">Pay Lead Price ${$getleadprice.price}</span>
                <input type="button" onclick="window.location.href='{$siteroot}/leads/{$smarty.get.id1}/payamount/'" name="btnstep4" id="btnstep4" value="Buy Lead" class="blue_btn margintp_bt" > 
                
                </section>
                
                <section style="margin:15px 0px;"><img src="{$siteroot}/templates/default/images/or_divider_new.png" /></section>
                
                 <dl>
                <dt></dt>
                <dd style="margin-left:125px; margin-top:10px;"><strong>Membership Plan Renewal</strong></dd>
                <section class="clear"></section>
                </dl>        
                <dl>
                <form id="frmplantype" name="frmplantype" method="POST" action="{$siteroot}/leads/payamount/"> 
                <section>            
                <section style="margin:20px 0px 20px 15px;">
                
                {if $getuserdet.plannid eq '1'}
                <section class="price_wrapper lF">    
                    <section class="blu_price_block">
                        <section class="tiltle">            
                        <input type="radio" class="radio" name="membershipplan" value="{$getplandetail[0].price}" {if $getuserdet.plannid eq '1'} checked="checked" {/if} onclick="return paymentfunction({$getplandetail[0].plan_id});" />{$getplandetail[0].name|ucfirst}</section>            
                        <section class="price"><strong>${$getplandetail[0].price}</strong></section>
                        <section class="lead">{$getplandetail[0].leads|ucfirst} LEADS</section>
                    </section>
                    <section class="clear"></section>
                </section> 
                {/if}
                {if $getuserdet.plannid eq '1' || $getuserdet.plannid eq '2'}
                <section class="price_wrapper lF">    
                    <section class="org_price_block">
                        <section class="tiltle">            
                        <input type="radio" class="radio" name="membershipplan" value="{$getplandetail[1].price}" {if $getuserdet.plannid eq '2'} checked="checked" {/if} onclick="return paymentfunction({$getplandetail[1].plan_id});" />{$getplandetail[1].name|ucfirst}</section>            
                        <section class="price"><strong>${$getplandetail[1].price}</strong></section>
                        <section class="lead">{$getplandetail[1].leads|ucfirst} LEADS</section>
                    </section>
                    <section class="clear"></section>
                </section> 
                {/if}
                {if $getuserdet.plannid eq '1'|| $getuserdet.plannid eq '2' || $getuserdet.plannid eq '3' || $getuserdet.plannid eq '4'}
                <section class="price_wrapper lF">    
                    <section class="gry_price_block">
                        <section class="tiltle">            
                        <input type="radio" class="radio" name="membershipplan" value="{$getplandetail[2].price}" {if $getuserdet.plannid eq '3' || $getuserdet.plannid eq '4'} checked="checked" {/if} onclick="return paymentfunction({$getplandetail[2].plan_id});" />{$getplandetail[2].name|ucfirst}</section>            
                        <section class="price"><strong>${$getplandetail[2].price}</strong></section>
                        <section class="lead">{$getplandetail[2].leads|ucfirst} LEADS</section>
                    </section>
                    <section class="clear"></section>
                </section> 
                {/if}
                {if $getuserdet.plannid eq '1'}
                <input type="hidden" name="plan_id" id="plan_id" value="{$getplandetail[0].plan_id}"  /> 
                {elseif $getuserdet.plannid eq '2'}
                <input type="hidden" name="plan_id" id="plan_id" value="{$getplandetail[1].plan_id}"  /> 
                {elseif $getuserdet.plannid eq '3'}
                <input type="hidden" name="plan_id" id="plan_id" value="{$getplandetail[2].plan_id}"  /> 
                {elseif $getuserdet.plannid eq '4'}
                <input type="hidden" name="plan_id" id="plan_id" value="{$getplandetail[2].plan_id}"  /> 
                {/if}
                <input type="hidden" name="jobid" id="jobid" value="{$smarty.get.id1}"  />  
                <section class="clear"></section>
                </section>
                  <section style="width:125px;" class="rF"><input type="submit" name="btnplan" id="btnplan" value="Continue" class="blue_btn" ></section> 	     <section class="clear"></section>  
                </section>
                <section class="clear"></section>
                </form>
                </dl>        
               
                
                <section class="clear"></section>	
             {/if}  
             {else}
             <section class="clear"></section>
             <section class="buyerinfo" style="background:none;border:none;">
	            <dl>
    	            <dd style="text-align:left">If you are interested then please click on below button.</dd>
        	        
                    <dd>
	                    <a href="{$siteroot}/register/" onclick="javascript:return confirm('you need to be a registered supplier to Purchase this job?');" class="blue_btn" > Interest</a>
    	            </dd>
        	        <section class="clear"></section>
               </dl>
 
             <section class="clear"></section>
             </section>
             {/if}
             </section>
            </section>
        </section>
        <section class="clear"></section>
    </section>
</section>

{include file=$footer}